{% extends './common/base.html' %} {% block body %}

<div class="page-header">
    <h2>接口文档中心
        <small>version 1.0.0版</small>
    </h2>
</div>


<div class="content-api-list">
    <div class="alert alert-info" style="width:100%">
        备注：此页面是项目集合页面，注意：⚠️⚠️ ⚠️
        <span class="alert-link" style="color:red;">删除相关项目时，请谨慎操作，会连同该项目所有的接口都将删除！务必小心！</span>⚠️⚠️ ⚠️
    </div>
    
    {% for item in result%}


    <div class="panel panel-info bs-callout">
        <div class="panel-heading">
            <h3 class="panel-title">
                <a href="javascript:;" @click="clickGroup('{{item.system_id}}')">{{item.system_name}}</a>
            </h3>
        </div>
        <div class="panel-body">
            <p>
                {{item.system_desc}}
            </p>
            <p class="flex-between-center">
                <span>
                    <i class="glyphicon glyphicon-user">

                    </i> admin</span>
                <span>
                    <i class="glyphicon glyphicon-time"></i> {{item.system_time}}</span>
            </p>
            <div class="">接口数量:{{item.count if item.count else "0"}}</div>
        </div>

        <div class="panel-footer">

            <div class="footer flex-between-center">
                <span>
                    <i class="glyphicon glyphicon-sound-5-1"></i>&nbsp;版本号: {{item.system_version}}</span>
                <div>
                    <button class="btn btn-success btn-xs" @click="editProject('{{item.system_id}}','{{item.system_name}}','{{item.system_version}}','{{item.system_desc}}','{{item.system_url}}')">
                        <i class="glyphicon glyphicon-check"></i>&nbsp;修改</button>
                    <button class="btn btn-danger btn-xs" @click="deleteProject('{{item.system_id}}')">
                        <i class="glyphicon glyphicon-trash"></i>&nbsp;删除</button>
                </div>
            </div>


        </div>

    </div>


    {% endfor %}


    <div class="panel panel-default bs-callout flex-align-center gray-color">
        <div class="panel-body ">
            <dl class="pointer" @click="addProjectItem">
                <dt>
                    <i class="glyphicon glyphicon-plus-sign f40"></i>
                </dt>
                <dd class="mt10">添加项目</dd>
            </dl>
        </div>
    </div>

</div>


<div class="modal fade" id="myDialog" data-backdrop="false" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
    <div class="modal-dialog " role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <h4 class="modal-title" id="myModalLabel">项目操作</h4>
            </div>
            <div class="modal-body">
                <form>
                    <div class="form-group">
                        <label for="recipient-name" class="control-label">项目名称:</label>
                        <input type="text" class="form-control" v-model.trim="system_name" placeholder="项目名称">
                    </div>
                    <div class="form-group">
                            <label for="message-text" class="control-label">项目接口地址:</label>
                            <input type="text" class="form-control" v-model.trim="system_url" placeholder="接口地址">
                        </div>
                    <div class="form-group">
                        <label for="message-text" class="control-label">项目版本号:</label>
                        <input type="text" class="form-control" v-model.trim="system_version" placeholder="项目版本号">
                    </div>
                    <div class="form-group">
                        <label for="message-text" class="control-label">项目介绍:</label>
                        <textarea class="form-control" v-model.trim="system_desc" rows="5" placeholder="项目介绍"></textarea>
                    </div>
                </form>

            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" @click="submitMethods">保存</button>
            </div>
        </div>
    </div>
</div>


{% endblock %} {% block script %}
<script src="/static/js/admin_index.js"></script>


{% endblock %}